/**
 * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.crossriver.crgis.database.model;

import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
import com.liferay.portal.kernel.util.StringBundler;
import com.liferay.portal.model.impl.BaseModelImpl;

import java.io.Serializable;

import java.lang.reflect.Proxy;

import java.util.Date;

/**
 * @author Wole Adetiba
 */
public class Application_C_of_OClp extends BaseModelImpl<Application_C_of_O>
	implements Application_C_of_O {
	public Application_C_of_OClp() {
	}

	public String getPrimaryKey() {
		return _applicationId;
	}

	public void setPrimaryKey(String pk) {
		setApplicationId(pk);
	}

	public Serializable getPrimaryKeyObj() {
		return _applicationId;
	}

	public String getApplicationId() {
		return _applicationId;
	}

	public void setApplicationId(String applicationId) {
		_applicationId = applicationId;
	}

	public String getUserId() {
		return _userId;
	}

	public void setUserId(String userId) {
		_userId = userId;
	}

	public Date getApplicationStartDate() {
		return _applicationStartDate;
	}

	public void setApplicationStartDate(Date applicationStartDate) {
		_applicationStartDate = applicationStartDate;
	}

	public Date getDateOfApplication() {
		return _dateOfApplication;
	}

	public void setDateOfApplication(Date dateOfApplication) {
		_dateOfApplication = dateOfApplication;
	}

	public String getFileNo() {
		return _fileNo;
	}

	public void setFileNo(String fileNo) {
		_fileNo = fileNo;
	}

	public String getOldCofONo() {
		return _oldCofONo;
	}

	public void setOldCofONo(String oldCofONo) {
		_oldCofONo = oldCofONo;
	}

	public String getApplication() {
		return _application;
	}

	public void setApplication(String application) {
		_application = application;
	}

	public String getApplicationType() {
		return _applicationType;
	}

	public void setApplicationType(String applicationType) {
		_applicationType = applicationType;
	}

	public Date getDateOfIssuance() {
		return _dateOfIssuance;
	}

	public void setDateOfIssuance(Date dateOfIssuance) {
		_dateOfIssuance = dateOfIssuance;
	}

	public String getPreviousCofONumber() {
		return _previousCofONumber;
	}

	public void setPreviousCofONumber(String previousCofONumber) {
		_previousCofONumber = previousCofONumber;
	}

	public String getLandUseType() {
		return _landUseType;
	}

	public void setLandUseType(String landUseType) {
		_landUseType = landUseType;
	}

	public String getLandUsePurpose() {
		return _landUsePurpose;
	}

	public void setLandUsePurpose(String landUsePurpose) {
		_landUsePurpose = landUsePurpose;
	}

	public String getAttestation() {
		return _attestation;
	}

	public void setAttestation(String attestation) {
		_attestation = attestation;
	}

	public String getStatus() {
		return _status;
	}

	public void setStatus(String status) {
		_status = status;
	}

	public String getReferenceNo() {
		return _referenceNo;
	}

	public void setReferenceNo(String referenceNo) {
		_referenceNo = referenceNo;
	}

	public Application_C_of_O toEscapedModel() {
		if (isEscapedModel()) {
			return this;
		}
		else {
			return (Application_C_of_O)Proxy.newProxyInstance(Application_C_of_O.class.getClassLoader(),
				new Class[] { Application_C_of_O.class },
				new AutoEscapeBeanHandler(this));
		}
	}

	public Object clone() {
		Application_C_of_OClp clone = new Application_C_of_OClp();

		clone.setApplicationId(getApplicationId());
		clone.setUserId(getUserId());
		clone.setApplicationStartDate(getApplicationStartDate());
		clone.setDateOfApplication(getDateOfApplication());
		clone.setFileNo(getFileNo());
		clone.setOldCofONo(getOldCofONo());
		clone.setApplication(getApplication());
		clone.setApplicationType(getApplicationType());
		clone.setDateOfIssuance(getDateOfIssuance());
		clone.setPreviousCofONumber(getPreviousCofONumber());
		clone.setLandUseType(getLandUseType());
		clone.setLandUsePurpose(getLandUsePurpose());
		clone.setAttestation(getAttestation());
		clone.setStatus(getStatus());
		clone.setReferenceNo(getReferenceNo());

		return clone;
	}

	public int compareTo(Application_C_of_O application_C_of_O) {
		int value = 0;

		value = getApplicationId()
					.compareTo(application_C_of_O.getApplicationId());

		if (value != 0) {
			return value;
		}

		return 0;
	}

	public boolean equals(Object obj) {
		if (obj == null) {
			return false;
		}

		Application_C_of_OClp application_C_of_O = null;

		try {
			application_C_of_O = (Application_C_of_OClp)obj;
		}
		catch (ClassCastException cce) {
			return false;
		}

		String pk = application_C_of_O.getPrimaryKey();

		if (getPrimaryKey().equals(pk)) {
			return true;
		}
		else {
			return false;
		}
	}

	public int hashCode() {
		return getPrimaryKey().hashCode();
	}

	public String toString() {
		StringBundler sb = new StringBundler(31);

		sb.append("{applicationId=");
		sb.append(getApplicationId());
		sb.append(", userId=");
		sb.append(getUserId());
		sb.append(", applicationStartDate=");
		sb.append(getApplicationStartDate());
		sb.append(", dateOfApplication=");
		sb.append(getDateOfApplication());
		sb.append(", fileNo=");
		sb.append(getFileNo());
		sb.append(", oldCofONo=");
		sb.append(getOldCofONo());
		sb.append(", application=");
		sb.append(getApplication());
		sb.append(", applicationType=");
		sb.append(getApplicationType());
		sb.append(", dateOfIssuance=");
		sb.append(getDateOfIssuance());
		sb.append(", previousCofONumber=");
		sb.append(getPreviousCofONumber());
		sb.append(", landUseType=");
		sb.append(getLandUseType());
		sb.append(", landUsePurpose=");
		sb.append(getLandUsePurpose());
		sb.append(", attestation=");
		sb.append(getAttestation());
		sb.append(", status=");
		sb.append(getStatus());
		sb.append(", referenceNo=");
		sb.append(getReferenceNo());
		sb.append("}");

		return sb.toString();
	}

	public String toXmlString() {
		StringBundler sb = new StringBundler(49);

		sb.append("<model><model-name>");
		sb.append("com.crossriver.crgis.database.model.Application_C_of_O");
		sb.append("</model-name>");

		sb.append(
			"<column><column-name>applicationId</column-name><column-value><![CDATA[");
		sb.append(getApplicationId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>userId</column-name><column-value><![CDATA[");
		sb.append(getUserId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>applicationStartDate</column-name><column-value><![CDATA[");
		sb.append(getApplicationStartDate());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>dateOfApplication</column-name><column-value><![CDATA[");
		sb.append(getDateOfApplication());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>fileNo</column-name><column-value><![CDATA[");
		sb.append(getFileNo());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>oldCofONo</column-name><column-value><![CDATA[");
		sb.append(getOldCofONo());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>application</column-name><column-value><![CDATA[");
		sb.append(getApplication());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>applicationType</column-name><column-value><![CDATA[");
		sb.append(getApplicationType());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>dateOfIssuance</column-name><column-value><![CDATA[");
		sb.append(getDateOfIssuance());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>previousCofONumber</column-name><column-value><![CDATA[");
		sb.append(getPreviousCofONumber());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>landUseType</column-name><column-value><![CDATA[");
		sb.append(getLandUseType());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>landUsePurpose</column-name><column-value><![CDATA[");
		sb.append(getLandUsePurpose());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>attestation</column-name><column-value><![CDATA[");
		sb.append(getAttestation());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>status</column-name><column-value><![CDATA[");
		sb.append(getStatus());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>referenceNo</column-name><column-value><![CDATA[");
		sb.append(getReferenceNo());
		sb.append("]]></column-value></column>");

		sb.append("</model>");

		return sb.toString();
	}

	private String _applicationId;
	private String _userId;
	private Date _applicationStartDate;
	private Date _dateOfApplication;
	private String _fileNo;
	private String _oldCofONo;
	private String _application;
	private String _applicationType;
	private Date _dateOfIssuance;
	private String _previousCofONumber;
	private String _landUseType;
	private String _landUsePurpose;
	private String _attestation;
	private String _status;
	private String _referenceNo;
}